﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdjustmentDetail.aspx.cs" Inherits="WMS6.Web.Inventory.AdjustmentDetail" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>AdjustmentDetail</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script> 
    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>
     <script src="../Js/Verification.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initDetailPage();
        }
        
        function reFresh()
        {
            
        }
          //弹出窗口选择货主
        function selectLocLopLpn()
        {
//           document.getElementById("txtLot").disabled="";
//              document.getElementById("txtLoc").disabled="";
//                 document.getElementById("txtLpnID").disabled="";
            var rtnValue = popModalWindow('../Inventory/InvLotLocLpnQuery.aspx?OwnerID='+escape(document.getElementById("hdnOwnerID").value),'dialogWidth=1000px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                var txtValue = rtnValue.split(',');              
                document.getElementById("hdnLot").value = txtValue[0];
                document.getElementById("hdnLoc").value = txtValue[1];
                document.getElementById("hdnLpnID").value = txtValue[2];
                document.getElementById("hdnSkuID").value = txtValue[3];
                document.getElementById("hdnDescr").value = txtValue[4];
                document.getElementById("hdnQty").value = txtValue[5];
                document.getElementById("hdnPackID").value = txtValue[6];       
               __doPostBack('<%=packID.ClientID.Replace('_','$')%>',''); 
            }
        }
        
        function calcAdjustmentQty(obj)
        {
            if(obj.value != "" )
            {
                document.getElementById("<%=txtQty2.ClientID %>").value = parseFloat(document.getElementById("<%=txtQty.ClientID %>").value) + parseFloat(obj.value);
            }
//            else
//            {
//                document.getElementById("<%=txtQty2.ClientID %>").value = "0";
//            }
        }
        
    </script>
</head>
<body>

    <form id="F5033" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom"><asp:Label ID="lblASNDetail" runat="server" 
                            CssClass="label_header" Text="库存调整明细" meta:resourcekey="lblASNDetail"></asp:Label></td>
                    <td><asp:Button ID="btnCancel" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnCancel%>" 
                            AccessKey="c" onclick="btnCancel_Click"  /></td>
                    <td><asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>" 
                            AccessKey="s"  onclick="btnSave_Click"  /></td>
                </tr>
            </table>
        </div>
        
         <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                 meta:resourcekey="lblMsg"></asp:Label>
        </div>
        
        <div id="div_menu">
        <div style="float: left; width: 8px;">
                <div class="tabL" id="divL1"></div>
            </div>
            <div style="float:left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)" id="divM1">
                <asp:Label ID="one1" CssClass="hover" runat="server" 
                    meta:resourcekey="one1">库存明细</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="divR1" ></div>
            </div>       
        </div>
        
        <div id="div_content">
             <div id="con_one_1" style="display: block;  overflow-x:auto; overflow-y:hidden;">
                 <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;" >
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblAdjustmentLineID" runat="server" CssClass="label" Text="行号" 
                                meta:resourcekey="lblAdjustmentLineID"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblSkuID" runat="server" CssClass="label" Text="货品代码" 
                                meta:resourcekey="lblSkuID"></asp:Label><font class="must_input">*</font>
                        </td>
                        <td width="180px" colspan=2>
                            <asp:Label ID="lblDescr" runat="server" CssClass="label" Text="货品描述" 
                                meta:resourcekey="lblDescr"></asp:Label>
                        </td>                     
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtAdjustmentLineID" runat="server" CssClass="textbox" 
                                Enabled="False" meta:resourcekey="txtAdjustmentLineID" ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtSkuID" runat="server" CssClass="textbox"  Enabled="False" 
                                meta:resourcekey="txtSkuID" ></asp:TextBox><img src="../Images/icon_find.gif" id=imgSkuID alt="select one item" runat="server" class="img" onclick="selectLocLopLpn();"  runat="server" />
                        </td>
                        <td width="180px" colspan=2>
                            <asp:TextBox ID="txtDescr" runat="server" CssClass="largetextbox" 
                                Enabled="False" meta:resourcekey="txtDescr" ></asp:TextBox>
                        </td>
                      
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblLoc" runat="server" CssClass="label" Text="货位" 
                                meta:resourcekey="lblLoc"></asp:Label><font class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblQty" runat="server" CssClass="label" Text="当前数量" 
                                meta:resourcekey="lblQty"></asp:Label>
                        </td>
                        <td width="180px" >
                            <asp:Label ID="lblReasonCode" runat="server" CssClass="label" Text="调整代码原因" 
                                meta:resourcekey="lblReasonCode"></asp:Label>
                        </td>
                        <td width="180px">
                           
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtLoc" runat="server" CssClass="textbox" Enabled="False" 
                                meta:resourcekey="txtLoc"   ></asp:TextBox><img src="../Images/icon_find.gif"   runat="server" id="imgLoc" alt="select one item" class="img" onclick="selectLocLopLpn();"  />
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtQty" runat="server" CssClass="textbox" Text="0" 
                                Enabled="False" meta:resourcekey="txtQty"  ></asp:TextBox>
                        </td>
                        <td width="180px">
                          <asp:DropDownList ID="ddlReasonCode" runat="server" CssClass="mediumselectbox" 
                                meta:resourcekey="ddlReasonCode"></asp:DropDownList>                        
                        </td>
                        <td width="180px">                        
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblPackID" runat="server" CssClass="label" Text="包装" 
                                meta:resourcekey="lblPackID"></asp:Label><font class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblQty1" runat="server" CssClass="label" Text="调整数量" 
                                meta:resourcekey="lblQty1"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblRemark" runat="server" CssClass="label" Text="调整原因描述" 
                                meta:resourcekey="lblRemark"></asp:Label>
                        </td>
                      
                         
                    </tr>
                    <tr>
                        <td width="180px">
                        <a id="packID" runat="server" onserverclick="txtPackID_OnTextChanged"></a>
                            <asp:TextBox ID="txtPackID" runat="server" CssClass="textbox" Enabled="False" 
                                meta:resourcekey="txtPackID"  ></asp:TextBox>
                        </td>
                        <td width="180px">
                             <asp:TextBox ID="txtQty1" runat="server" CssClass="textbox" Text="0" 
                                 onblur="calcAdjustmentQty(this);" meta:resourcekey="txtQty1"></asp:TextBox>
                        </td>
                        <td width="180px" rowspan=3 colspan=2>
                            <asp:TextBox ID="txtRemark" runat="server" CssClass="largetextarea" 
                                TextMode="MultiLine" meta:resourcekey="txtRemark" ></asp:TextBox>
                        </td>
                     
                    </tr>
                        <tr>
                        <td width="180px">
                            <asp:Label ID="lblUomID" runat="server" CssClass="label" Text="计量单位" 
                                meta:resourcekey="lblUomID"></asp:Label><font class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblQty2" runat="server" CssClass="label" Text="目标数量" 
                                meta:resourcekey="lblQty2"></asp:Label>
                        </td>
                    
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:DropDownList ID="ddlUomID" runat="server" AutoPostBack="True" 
                                Enabled="False" onselectedindexchanged="ddlUomID_SelectedIndexChanged" 
                                CssClass="mediumselectbox" meta:resourcekey="ddlUomID">
                            </asp:DropDownList>
                        </td>
                        <td width="180px">
                             <asp:TextBox ID="txtQty2" runat="server" CssClass="textbox" Text="0" 
                                 Enabled="False" meta:resourcekey="txtQty2" ></asp:TextBox>
                        </td>
                      
                     
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblLot" runat="server" CssClass="label" Text="批次号" 
                                meta:resourcekey="lblLot"></asp:Label>
                        </td>
                        <td width="180px">
                            
                        </td>
                       
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtLot" runat="server" CssClass="textbox" Enabled="False" 
                                meta:resourcekey="txtLot" ></asp:TextBox>
                        </td>
                        <td width="180px">
                                  </td>
                      
                    </tr>                 
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblLpnID" runat="server" CssClass="label" Text="LPN" 
                                meta:resourcekey="lblLpnID"></asp:Label>
                        </td>
                        <td width="180px">
                           
                        </td>
                        <td width="180px">
                           
                        </td>
                        <td width="180px">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtLpnID" runat="server" CssClass="textbox" Enabled="False" 
                                meta:resourcekey="txtLpnID" ></asp:TextBox>
                        </td>
                        <td width="180px">
                          
                        </td>
                        <td width="180px">
                           
                        </td>
                        <td width="180px">
                            &nbsp;
                        </td>
                    </tr>
                    <tr style="height:10px;">
                        <td width="180px">
                        </td>
                        <td width="180px">
                        </td>
                        <td width="180px">
                        </td>
                        <td width="180px">
                        </td>
                    </tr>
                 </table>
             </div>
          
        </div>
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
    <input type="hidden" id="hdnReceiptID" runat="server" />
    <input type="hidden" id="hdnOwnerID" runat="server" />
    <input type="hidden" id="hdnLot" runat="server" />
    <input type="hidden" id="hdnLoc" runat="server" />
    <input type="hidden" id="hdnLpnID" runat="server" />
    <input type="hidden" id="hdnSkuID" runat="server" />
    <input type="hidden" id="hdnDescr" runat="server" />
    <input type="hidden" id="hdnQty" runat="server" />
    <input type="hidden" id="hdnUomQty" runat="server" />
    <input type="hidden" id="hdnPackID" runat="server" />
    </form>
</body>
</html>
